SRC = ../testing.c ../paging.c
INC = -I../../include -I../include -I.
CFLAGS = $(INC)

all: tester.bin.o

tester.bin.o: $(SRC)
	gcc $(CFLAGS) -c $^
	objcopy -R.eh_frame -R.comment ../testing.o
	objcopy -R.eh_frame -R.comment handlers64asm.o
	ld -T script.ld --oformat binary -o handlers64.bin handlers64.o handlers64asm.o
	objcopy --input binary --output elf64-x86-64 --binary-architecture i386 handlers64.bin $@

clean:
	@rm -rf *.o *.bin offset_gen
